package com.wq.feign.provider.controller;

import com.wq.feign.api.domain.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("/oauth")
public class AuthController {

    @Value("${rsa.publicKey}")
    public String publicKey;

    @GetMapping("/publicKey")
    public Result getPublicKey(){
        return new Result(200,"success",this.publicKey);
    }
}


